Repository navigation
feat(utils): normalize all headings to strip size modifier - #166
Open
marissahuysentruyt wants to merge 1 commit into
Open
marissahuysentruyt wants to merge 1 commit into
marissahuysentruyt wants to merge 1 commit into
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
marissahuysentruyt
force-pushed
the
heading-ids
branch
from
October 5, 2026 14:00
301b6a6 to
b045da6
Compare
marissahuysentruyt
marked this pull request as ready for review
October 5, 2026 14:25
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR scans
ids of heading elements for the size modifier (-size-*if the modifier is at the end of the id;size-*-if it's at the beginning of the id) and removes it for the search index.We remove any
size-*modifier in theids of the h2 elements that sit in the page nav. This results in clean looking id's and urls. So this update makes sure that any heading gets the same treatment on the backend. It was noticed that the indexer is still reading the pre-JavaScript headings that might includesize-*. This data (withsize-*) then gets stored in the search index, and when a person follows a search result, the anchor link they follow has thesize-*modifier. But that is a broken link- it doesn't exist on the page after JS runs.Screenshots (if applicable)
🚫 Before



✅ After
Type of change
Related issue(s)
Validation steps
To Validate
URL for testing:
https://heading-ids--spectrum-hub--adobe.aem.live/
npm testand confirm all tests passnpm run lintand confirm no linting errorsaem upnode tools/indexer/index.js --dry-runfrom the root of the repo. You'll need to have the following in a.envfile:/out/records.json, like "typography," "button," or "writing."size-*modifiers from anchors (as see in theobjectIDandurl)-size-*modifiers from anchors (as see in theobjectIDandurl)#sizein/out/records.json. There should only be 6 returns, related to the "Sizes" heading/section on the Illustration page and the "Size" section on the Standard panel page.#sizein your editor, you get over 3500 results back. 😭Accessibility testing checklist
Keyboard
N/A
Screen reader
N/A
Device review
Checklist: